import React, { Suspense } from "react";
import { BrowserRouter, useRoutes } from "react-router-dom";
import { routes } from "./routes";

const RouterView = () => useRoutes(routes);
const Router = () => {
  return (
      <Suspense fallback={<div>路由加载中...</div>}>
        <RouterView></RouterView>
      </Suspense>
  );
};

export default Router;
